function FindProxyForURL(url, host) {
if (isPlainHostName(host)) return "DIRECT";
PROXY = "PROXY 127.0.0.1:8087";

if (dnsDomainIs(host, ".appspot.com")) return PROXY;
if (dnsDomainIs(host, ".awsstatic.com")) return PROXY;
if (dnsDomainIs(host, ".blogger.com")) return PROXY;
if (dnsDomainIs(host, ".blogspot.com")) return PROXY;
if (dnsDomainIs(host, ".chinagfw.org")) return PROXY;
if (dnsDomainIs(host, ".facebook.com")) return PROXY;
if (dnsDomainIs(host, ".facebook.net")) return PROXY;
if (dnsDomainIs(host, ".fbcdn.net")) return PROXY;
if (dnsDomainIs(host, ".feedburner.com")) return PROXY;
if (dnsDomainIs(host, ".feedly.com")) return PROXY;
if (dnsDomainIs(host, ".flickr.com")) return PROXY;
if (dnsDomainIs(host, ".getpocket.com")) return PROXY;
if (dnsDomainIs(host, ".ggpht.com")) return PROXY;
if (dnsDomainIs(host, ".gitbooks.io")) return PROXY;
if (dnsDomainIs(host, ".gmail.com")) return PROXY;
if (dnsDomainIs(host, ".google.co.jp")) return PROXY;
if (dnsDomainIs(host, ".google.com")) return PROXY;
if (dnsDomainIs(host, ".google.com.hk")) return PROXY;
if (dnsDomainIs(host, ".google.jp")) return PROXY;
if (dnsDomainIs(host, ".googleapis.com")) return PROXY;
if (dnsDomainIs(host, ".googlecode.com")) return PROXY;
if (dnsDomainIs(host, ".googleusercontent.com")) return PROXY;
if (dnsDomainIs(host, ".googlevideo.com")) return PROXY;
if (dnsDomainIs(host, ".gravatar.com")) return PROXY;
if (dnsDomainIs(host, ".gstatic.com")) return PROXY;
if (dnsDomainIs(host, ".libsyn.com")) return PROXY;
if (dnsDomainIs(host, ".mozilla.net")) return PROXY;
if (dnsDomainIs(host, ".mozilla.org")) return PROXY;
if (dnsDomainIs(host, ".pantb.com")) return PROXY;
if (dnsDomainIs(host, ".plangrid.com")) return PROXY;
if (dnsDomainIs(host, ".raymond.cc")) return PROXY;
if (dnsDomainIs(host, ".receivesmsonline.net")) return PROXY;
if (dnsDomainIs(host, ".sourceforge.net")) return PROXY;
if (dnsDomainIs(host, ".twimg.com")) return PROXY;
if (dnsDomainIs(host, ".twitter.com")) return PROXY;
if (dnsDomainIs(host, ".v2ex.com")) return PROXY;
if (dnsDomainIs(host, ".w3schools.com")) return PROXY;
if (dnsDomainIs(host, ".wp.com")) return PROXY;
if (dnsDomainIs(host, ".yimg.com")) return PROXY;
if (dnsDomainIs(host, ".youtube.com")) return PROXY;
if (dnsDomainIs(host, ".ytimg.com")) return PROXY;
if (dnsDomainIs(host, ".zsh.org")) return PROXY;
if (dnsDomainIs(host, "ashadowsocks.com")) return PROXY;
if (dnsDomainIs(host, "assets-cdn.github.com")) return PROXY;
if (dnsDomainIs(host, "btbtt.la")) return PROXY;
if (dnsDomainIs(host, "cdn.sstatic.net")) return PROXY;
if (dnsDomainIs(host, "chinadigitaltimes.net")) return PROXY;
if (dnsDomainIs(host, "codecall.net")) return PROXY;
if (dnsDomainIs(host, "duckduckgo.com")) return PROXY;
if (dnsDomainIs(host, "feedly.com")) return PROXY;
//if (dnsDomainIs(host, "getpocket.com")) return PROXY;
if (dnsDomainIs(host, "git-scm.com")) return PROXY;
if (dnsDomainIs(host, "github.io")) return PROXY;
if (dnsDomainIs(host, "gitolite.com")) return PROXY;
if (dnsDomainIs(host, "goo.gl")) return PROXY;
if (dnsDomainIs(host, "linuxbsdos.com")) return PROXY;
if (dnsDomainIs(host, "nodejs.org")) return PROXY;
if (dnsDomainIs(host, "onedrive.live.com")) return PROXY;
if (dnsDomainIs(host, "pocket.co")) return PROXY;
if (dnsDomainIs(host, "receive-sms-online.com")) return PROXY;
if (dnsDomainIs(host, "shadowsocks.org")) return PROXY;
if (dnsDomainIs(host, "stackoverflow.com")) return PROXY;
if (dnsDomainIs(host, "twitter.com")) return PROXY;
if (dnsDomainIs(host, "v2ex.com")) return PROXY;
if (dnsDomainIs(host, "vpnss.com")) return PROXY;
if (dnsDomainIs(host, "wikipedia.org")) return PROXY;
if (dnsDomainIs(host, ".appledaily.com.tw")) return PROXY;
if (dnsDomainIs(host, "gggritso.com")) return PROXY;
if (dnsDomainIs(host, "s3.amazonaws.com")) return PROXY;
if (dnsDomainIs(host, ".voachinese.com")) return PROXY;
if (dnsDomainIs(host, ".voanews.com")) return PROXY;
if (dnsDomainIs(host, "alternativeto.net")) return PROXY;

// the following sites would be unblocked sometimes, need check them out again.
if (dnsDomainIs(host, "userstyle.org")) return PROXY;

return "DIRECT";
}
